const Mock = require('mockjs')

const data = Mock.mock({
  countNumber: '3131209380',
  bioList: '人脸，指纹',
  softBioList: '体重，身高',
  time: '3ms',
  accuracy: '99%'
})
const authData = Mock.mock({
  'items|40': [{
    id: '@id',
    userName: '@word(6,16)',
    'bioType|1': ['指纹识别', '人脸识别'],
    'softBioType|1': ['体重', '身高', '体重，身高', '无'],
    status: 'success',
    requestNetwork: '@ip',
    requestTime: '@datetime',
    duringTime: '@natural(1,5)'
  }]
})
module.exports = [
  {
    url: '/yunwu-demo/bioAuthData/bioAuthResult',
    type: 'get',
    response: config => {
      return {
        code: 20000,
        data: data
      }
    }
  },
  {
    url: '/yunwu-demo/bioAuthData/authData/list',
    type: 'get',
    response: config => {
      const items = authData.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
